package com.yjf.ljr.util;

import com.yjf.ljr.R;

import android.app.Dialog;
import android.app.ProgressDialog;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.view.animation.LinearInterpolator;
import android.widget.ImageView;
import android.widget.TextView;

public class ProgersssDialogCustom extends Dialog {
	private ImageView img;
	private TextView txt;

	public ProgersssDialogCustom(Context context) {
		super(context, R.style.progress_dialog_style);
		LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
		View view = inflater.inflate(R.layout.progress_dialog, null);
		img = (ImageView) view.findViewById(R.id.progress_dialog_img);
		txt = (TextView) view.findViewById(R.id.progress_dialog_txt);
		Animation anim = AnimationUtils.loadAnimation(context, R.anim.loading_dialog_progressbar);
		img.setAnimation(anim);
		setContentView(view);
		show(); // 显示
	}

	@Override
	public void show() {
		// TODO Auto-generated method stub
		super.show();
	}

	public void setText(String msg) {
		txt.setText(msg);
	}

}
